﻿using BomComparison.Core.Interface;

namespace BomComparison.Core.Model;

public class ComparisonResult
{
    // 对比基本信息
    public string ComparisonId { get; set; } // 唯一标识符
    public DateTime ComparisonTime { get; set; } // 对比时间
    public string SourceBomName { get; set; } // 源BOM名称
    public string TargetBomName { get; set; } // 目标BOM名称

    // 对比结果汇总
    public int TotalComponents { get; set; } // 总组件数
    public int AddedComponents { get; set; } // 新增组件数
    public int RemovedComponents { get; set; } // 删除组件数
    public int ModifiedComponents { get; set; } // 修改组件数

    /// <summary>
    /// 按物料编号（Part Number）汇总的差异项
    /// </summary>
    public List<ComparisonResultByPartNumber> SummaryByPartNumbers { get; set; } = new();

    // PartReference对比结果
    /// <summary>
    /// 按位号（Part Reference）汇总的差异项
    /// </summary>
    public List<ComparisonResultByPartReference> SummaryByPartReferences { get; set; } = new();

    public ComparisonResult()
    {

    }

    public ComparisonResult(
        List<ComparisonResultByPartNumber> byPartNumber)
    {
        SummaryByPartNumbers = byPartNumber;

    }
}
